package com.ihy.service.impl;

import com.ihy.dao.mybatis.DaoAbout;
import com.ihy.entity.About;
import com.ihy.service.ServiceAbout;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ServiceAboutImpl implements ServiceAbout {
    @Autowired
    private DaoAbout daoAbout;

    @Override
    @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
    @Cacheable(key = "'aboutIdIs'+#p0", value = "redisCacheTime")
    public About getAbout(int id) {
        return daoAbout.getAbout(id);
    }
}
